package com.ruoyi.commodity.mapper;

import com.ruoyi.commodity.domain.CommodityType;
import com.ruoyi.commodity.domain.vo.CommodityTypeQueryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityTypeMapper {



    public int insertCommodityType(CommodityType commodityType);

    public CommodityType checkCommodityTypeNameUnique(String commodityTypeName);

    CommodityType selectCommodityTypeById(Long commodityTypeId);

    List<CommodityType> selectCommodityTypeList(CommodityTypeQueryVo commodityType);

    int selectNormalChildrenCommodityTypeById(Long commodityTypeId);

    int hasChildByCommodityTypeId(Long commodityTypeId);

    public List<CommodityType> selectChildrenCommodityTypeById(Long commodityTypeId);

    public int updateCommodityTypeChildren(@Param("CommodityType") List<CommodityType> list);

    public int updateCommodityType(CommodityType commodityType);

    void updateCommodityTypeStatusNormal(Long[] commodityTypeIds);

    int deleteCommodityTypeById(Long commodityTypeId);
}
